(help-fns-function-description-header): Fix last change (bug#70209)
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 5 Apr 2024 22:29:16 +0000 (18:29 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 5 Apr 2024 22:29:16 +0000 (18:29 -0400)
* lisp/help-fns.el (help-fns-function-description-header): Don't make
a button for the type if it's not a type.

lisp/help-fns.el

index 27011575333c7c618dcfd313ac12b00a6789e532..cfe27077055215c49fec9707dae6532dac9c82d5 100644 (file)
@@ -1096,15 +1096,15 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
                      (setq elts (cdr-safe elts)))
                    (concat beg (if is-full "keymap" "sparse keymap"))))
                 (t
-                 (let ((type
-                        (if (and (consp def) (symbolp (car def)))
-                            (car def)
-                          (or (oclosure-type def) (cl-type-of def)))))
-                   (concat beg (format "%s"
-                                       (make-text-button
-                                        (symbol-name type) nil
-                                        'type 'help-type
-                                        'help-args (list type)))))))))
+                 (concat beg (format "%s"
+                                     (if (and (consp def) (symbolp (car def)))
+                                         (car def)
+                                       (let ((type (or (oclosure-type def)
+                                                       (cl-type-of def))))
+                                         (make-text-button
+                                          (symbol-name type) nil
+                                          'type 'help-type
+                                          'help-args (list type))))))))))
     (with-current-buffer standard-output
       (insert description))